Align Log4j across published BOMs - #16045
Merged
Merged
Conversation
Move Log4j 2.25.5 management into the shared Gradle BOM maps and import the Log4j BOM first from every published BOM so Maven and Gradle consumers receive the fixed version across the complete family. Manage biz.aQute.bnd.annotation 7.1.0, which Log4j 2.25.5 requires, so the dependency version validator matches the winning transitive version. Assisted-by: opencode:gpt-5.6-sol codegraph
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns Log4j dependency management across the Grails published BOMs to ensure Log4j 2.25.5 (and its transitive Bnd annotation version) consistently wins over Spring Boot’s older managed versions, including in scenarios where BOM import order matters.
Changes:
- Adds
log4j-bomas an explicit, first-imported platform in each published BOM’sdependenciesblock (before Spring Boot / inherited platforms). - Centralizes Log4j and Bnd annotation version management into the shared Gradle BOM maps in
dependencies.gradle, and wireslog4j2-bomintogradleBomPlatformDependencies/combinedPlatforms. - Moves Log4j module coordinates into the shared Gradle BOM dependency map so they are consistently available across publications.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
grails-gradle/bom/build.gradle |
Imports log4j2-bom before spring-boot-bom to ensure Maven/Gradle BOM ordering favors Log4j 2.25.5. |
grails-bom/base/build.gradle |
Imports log4j2-bom before spring-boot-bom for the base Grails BOM publication chain. |
grails-bom/hibernate5/build.gradle |
Adds early log4j2-bom import so Hibernate 5 BOM consumers inherit Log4j 2.25.5 management consistently. |
grails-bom/micronaut/build.gradle |
Adds early log4j2-bom import so Micronaut BOM layering doesn’t regress Log4j module versions. |
dependencies.gradle |
Adds bnd.version (7.1.0), defines log4j2-bom in shared Gradle BOM platform map, and moves Log4j management into the shared Gradle BOM maps used by published BOMs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ All tests passed ✅🏷️ Commit: 811faed Learn more about TestLens at testlens.app. |
jdaugherty
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to merged PR #16043. That PR correctly upgraded Log4j to
2.25.5, but its CI run exposed two publication issues that this change resolves:2.25.5transitively selectsbiz.aQute.bnd.annotation:7.1.0, while Spring Boot 3.5.16 manages7.0.0. The shared Grails BOM maps now manage the winning7.1.0version, fixingValidate Dependency Versions.log4j-bombefore inherited platforms. This prevents Maven's first-import-wins behavior and GradleenforcedPlatformvariants from leaving non-explicit Log4j modules at Spring Boot's older2.24.3version.The affected publications are:
grails-gradle-bomgrails-base-bomgrails-bomgrails-hibernate5-bomgrails-micronaut-bomVerification
log4j-bombefore Spring Boot/Grails/Micronaut inherited platforms.org.apache.logging.log4j:log4j-layout-template-jsonmodule to 2.25.5 in every case.git diff --checkpasses.